home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation
/
Animation Vol.1 (Profi ROM)(1994).iso
/
pool
/
updates
/
symantec
/
rtlinc.exe
/
TIME.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-14
|
3KB
|
102 lines
/*_ time.h Sat Jul 15 1989 Modified by: Walter Bright */
/* Copyright (C) 1986-1989 by Walter Bright */
/* All Rights Reserved */
/* Written by Walter Bright */
/* Date and time support */
/* $Revision: 1.2 $ */
#ifndef __TIME_H
#define __TIME_H 1
#if __cplusplus
extern "C" {
#endif
typedef unsigned size_t;
#define CLOCKS_PER_SEC ((clock_t) 100) /* (clock_t / CLOCKS_PER_SEC) == seconds */
#define CLK_TCK ((clock_t) 100) /* (clock_t / CLK_TCK) == seconds */
typedef long clock_t;
#ifndef __TYPES_H
typedef long time_t;
#endif
#ifdef __STDC__
#define __CDECL
#define __STDCALL
#else
#define __CDECL __cdecl
#define __STDCALL __stdcall
#endif
#if __OS2__ && __INTSIZE == 4
#define __CLIB __STDCALL
#else
#define __CLIB __CDECL
#endif
/* Structure to contain broken-down time */
struct tm
{ int tm_sec, /* seconds 0..59 */
tm_min, /* minutes 0..59 */
tm_hour, /* hour of day 0..23 */
tm_mday, /* day of month 1..31 */
tm_mon, /* month 0..11 */
tm_year, /* years since 1900 */
tm_wday, /* day of week, 0..6 (Sunday..Saturday) */
tm_yday, /* day of year, 0..365 */
tm_isdst; /* >0 if daylight savings time */
/* ==0 if not DST */
/* <0 if don't know */
};
#define TIMEOFFSET 315558000 /* Unix time - DOS time */
clock_t __CLIB clock(void);
time_t __CLIB time(time_t *);
time_t __CLIB mktime(struct tm *);
char * __CLIB asctime(const struct tm *);
char * __CLIB ctime(const time_t *);
struct tm * __CLIB localtime(const time_t *);
struct tm * __CLIB gmtime(const time_t *);
size_t __CLIB strftime(char *,size_t,const char *,const struct tm *);
int __CLIB stime(time_t *ptr);
char * __CLIB _strdate(char *dstring);
char * __CLIB _strtime(char *timestr);
/* Difference between two time_t's */
#define difftime(t1,t2) ((double)((time_t)(t1) - (time_t)(t2)))
/* No GMT is available, so just return NULL */
#define gmtime(a) ((struct tm *) 0)
/* non-ANSI functions */
#if !__STDC__
#if M_UNIX || M_XENIX
/* This is the structure used by long times(struct tms *buf) */
struct tms
{ time_t tms_utime; /* user */
time_t tms_stime; /* system */
time_t tms_cutime; /* user children */
time_t tms_cstime; /* system children */
};
unsigned int __CLIB sleep(unsigned int);
long int __CLIB nap(long int mS);
#define usleep(s) (void)nap((s)/1000)
#define msleep(s) (void)nap(s)
#else
void __CLIB sleep(time_t);
void __CLIB usleep(unsigned long);
void __CLIB msleep(unsigned long);
int __CLIB utime(const char *,time_t [2]);
#endif
#endif
#if __cplusplus
}
#endif
#endif /* __TIME_H */